import moment from "moment"
function nextDay(days,getdata) {
    console.log(getdata,'1111')
    let list = []
    for (let i = days-1; i >= 0; i--) {
       
        let obj = {
            count: 0,
            date: moment(new Date()).subtract(i, 'days').format('YYYY-MM-DD'),
           
        }
        let filter_list = getdata.filter((item,index)=>item.date==obj.date)
        console.log(filter_list,'11ww1')
        filter_list.length>0?list.push(filter_list[0]):list.push(obj)

    }
    console.log(list,'-----')
   return list
}

export { nextDay };